JBTree Version a4.1 (c)JBSoft 1992-4 This is a program which displays the directories and files on any disk (internal or external). It shows the current directory and other directories at the same level, plus any directories immediately subordinate to the directory on which the cursor is on. It also displays the files in the current directory. The program is free for your use but I retain all copyright on the code (where applicable - some of the Pack information was provided by Wolfgang Schirmer - thanks). N.B. If you can't be bothered to plough through this document please note that Copy, Move etc. only work after you have Marked the file using the Space Bar or the Enter key. Background ---------- This utility was first started in the days of the Series 3 but I only got it to a reasonable state on the appearance of the Series 3a. It has been translated on, and therefore will only run in its present state on, a S3a although I suspect it could be adapted to compile and run on an S3 with some compromises. There are some limitations which I suspect you will discover as you use it. Manual and Usage ---------------- This is work in progress (I suppose, as I keep changing it) and so it comes without a proper manual (it's also got fairly complex and I don't really have the time to write a proper one). This document is getting close to turning into a manual as I expand on it. Help is available on the HELP key at most times and, as with most OPL programs, you can escape using Psion-Esc or Psion-X at any time. Installation ------------ Copy JBTREE.OPA to any directory (normally \APP\ but this is not mandatory) and install it in the usual way using Psion-I. If you require to view files using their native application then the file JBTREE.DBF should also be placed in the \APP\ directory. When JBTree is first run the file is moved to a sub-directory off \APP\ called \JBTREE\ (i.e. \APP\JBTREE\). This sub-directory should be created automatically. If not, it is permissable to generate it manually. There has been one instance of the directory not being created of which I am aware. If you require the Launch menu then JBTL.OPO and JBTL.DBF should be placed in the \APP\ directory. They will be moved to the appropriate by the program on startup. N.B. Care should be taken when upgrading the program - any datafiles will be overwritten if they exist in the \APP\ directory when the program is started. Starting the program -------------------- To start the program place the cursor on the JBTree word and press Enter to start the program. After starting the program you are prompted for a Drive - if the 3- Link is active then, before the drive menu is accessed, a choice of Local or Remote is given. Remote means drives on the remote computer. If the drive you wish to access is not shown on the menu then press Esc and you can then select almost any drive (including the ROM) with the dialog displayed at this point. N.B. If the letter keys (e.g.'F') do not appear to work or do not work as expected, check that you do not have CAPS LOCK on. The S3a is case sensitive on the keys checking. Unfortunately, unlike the good old Organiser II, it does not appear possible to alter the state of the CAPS LOCK from within the program using OPL so please be sure that this is switched off whilst using the program. Keys Used ========= General ------- : Up : Down PgUp: Page Up PgDn: Page Down Home: 1st Dir End: Last Dir Tab: Files/Dir switch Psion-J: Info (About) Psion-S: Sort #(character key): Goto dir/file Psion-Shift-C: JBTree Config Psion-Shift-F: View Config Psion-U: Update Directories/Files Psion-F: Pack Info Shift-Psion-L: Launch sub-menu Psion-X: Exit In Directory Tree ----------------- Psion-D: Change Drive : Sub-Dir : Up-Dir Psion-+: Add Dir Psion--: Del Dir Psion-C: Copy Dirs Psion-M: Move Dirs Psion-R: Rename Dir Psion-Shift-D: Delete Dirs Psion-L: Look for File Psion-A: Look again Ctrl-A/B/M: Quick drive change In Files List ------------- Psion-I: Toggle Files Info Psion-T: Mark All Files Psion-Shift-T: Unmark All Files Space: Mark file toggle : Mark toggle + Move down Psion-D: Delete Psion-C: Copy Psion-(Shift)M: Move (& Rename) Psion-R: Rename Psion-Shift-R: Copy & Rename Psion-A: File Attributes Psion-N: Info Psion-(Shift)V/Psion-H: View file(in Word)/Hex Moving Around ------------- Use the cursor keys in the normal way. To go to a sub-directory use the right arrow key, to go to the parent directory above the present one use the left arrow key. To flip between the Directory list and the Files list use Tab. If in the Files list then Escape will also take you to the Directory list. To change the drive use Psion-D whilst in the directory list. An alternative, if just the local drives are required, is to use Ctrl-A -B or -M. This bypasses the dialogs and so speeds up the selection a little. It is possible to jump to a directory or file within the current list by using 'c' where 'c' is the first character of the name to find. Create/Delete/Rename Directories -------------------------------- It is possible to create new directories by positioning on the directory to which the directory to be created will be subservient and then using Psion- + (the Psion key along with the '+' key). Deletion of a directory (which must be empty of files) is acheived by using Psion-- (the Psion key together with the '-' key). It is also possible to delete a whole sub- directory tree (including any files) using Psion-Shift-D. To rename a directory, place the cursor on the directory to be renamed and press Psion- R. A dialog will display showing the old name and prompting for the new one (the default display shows the same name as the old). After entering the new directory name, press return and (eventually) the screen will display showing the new directory name. Copying/Moving/Deleting ----------------------- When in the File list the required files must be selected by using either the Space bar or Enter before any action can be taken. After marking the selection is denoted by a star beside the filename. The keys used for marking can also be used to deselect a file in the same way (they act as a toggle). All files in the current directory can be marked using Psion-T and deselected using Psion-Shift-T. Once the files have been marked then use of Psion + C/M/D will either copy/move or delete the selected files. If copy or move are selected then the display will re-display the directory tree and you should move to the appropriate destination drive and directory in the usual way before pressing Enter. You can create new directories whilst in this selction mode. Enter will activate the copy or move. If you require to Copy or Move together with Renaming the file - use Psion-Shift-R for Copy & Rename and Psion-Shift-M for Move and Rename. The program will do bulk copying/moving/deleting of directories using Psion+C/M/Shift-D. When copying or moving an option is given to use the existing directory or not. What this means is that the data in the top directory chosen to copy or move will either go into the destination directory chosen or will create a directory below the destination directory and use that. (e.g. Source directory = A:\JBTREE : Destination directory = A:\DOS. If Existing is chosen then the files in the JBTREE directory will end up in the DOS directory and any sub-directories will be created below the DOS directory; If Existing is not chosen then a directory called JBTREE will be created as a sub-directory of DOS and the files moved accordingly.) Other options ------------- Files can be renamed by highlighting them using the cursor and pressing Psion-R. A dialog is displayed allowing the name and/or the extension to be changed. File attributes can be reset using Psion-A once the files to be changed have been marked. If no file is marked then the attributes for the current file under the cursor is shown. If Escape is pressed (rather than return) when in the Set dialog then the viewing is abandoned. Changes are made using the Enter key once the dialog has been set as required. Finding a file -------------- It is possible to find a file on a particular drive. By pressing Psion-L a dialog shows prompting for the file to find. This need not be the full name but just sufficient to identify the file. If the file is found the display will stop on that directory. If the search is be resumed use Psion-A to continue the existing search. Because of the potential for continuing the search I have had to get all the directory names before starting the search and the screen will reflect this delay before the search is commenced. Only the current drive is searched - to search other drives you must first move to the required drive before implementing the search. Wildcards are not implemented but a partial filename is acceptable. Viewing a file -------------- One thing that may not be clear from the help page is that it is possible to View or Launch files with the aid of a configuration database file called JBTREE.DBF. This can be configured from within JBTree using Psion- Shift-F. It will Launch anything (including things like Notepad) given the correct configuration. There are four fields in the configuration file: 1. Extension - this is the extension the program will use to determine which database record to use. 2. Run filename - this is the program to run in conjunction with the file selected (e.g. WRD extension should use ROM::WORD.APP). 3. Extra filename - This field is for use with OPA files that use file lists (e.g. Notepad). If this field is used then it is probable that the Run filename will be ROM::SYSPRGO.IMG. 4. Alias Info - currently the only program that would use this field is WORD unless there is a 3rd party application of which I am unaware. The two .ALS files (PROGRAM and SCRIPT) in the ROM should not be called explicitly - they are loaded as required according to the alias data. Briefly: The first letter specifies Program or Script (either O or S) - the second letter specifies if RUN is allowed and the next three letters give both the top directory any compiled programs are placed in and also the files extension. For examples see the enclosed JBT.DBF file for examples of using the fields. This is actually my configuration file but gives you a clue as to what to do. The working configuration file should be called JBTREE.DBF and exist in a directory called JBTREE. This, in turn, should exist as a sub-directory off the directory in which JBTREE.OPA exists. It must also be on the same drive. If you are upgrading the program from a previous version then the new directory will be automatically made and the file moved. If this is a first installation then you could copy both the .APP and .DBF files to the same directory and the rest of the creation and moving will be automatic when the program is first run, or you could manually create the directory and move the file into it. Because I use the Data application to access this file for alteration, if my file is not used as a starter, then the Field titles will have to be typed in manually. I have included a JBTREE.DBF file which is a Data file with just the built-in applications and the field names included. To use the database place the cursor on the file you require to view and press Psion-V. If the Extension does not exist in the database then an option to use Word will be given. It is also possible to force the use of Word at all times by using Psion-Shift-V instead of Psion- V. Once the file has been opened it must be closed in the normal way for that program (usually Psion-X) otherwise, once you return to the System screen, the file will show as open but not necessarily under its normal icon. Hex View/Edit ------------- To view or edit in a Hex or 'Dump' format then use Psion-H. To exit from the procedure use either Escape or Psion-X. Move around the display using the cursor keys and switch between the Hex and ASCII columns using the Tab key. To toggle between Edit and View use Psion-E. It is possible to edit in the ASCII display as well as the Hex display. To jump to a new location use Psion-J - the location should be inputted in Hex digits. To search within the file use Psion-F. If you are in the Hex part of the display then input Hex characters (0-9,A-F) - the A-F characters can be typed in lower case - the program will automatically convert. If in the ASCII section then ASCII characters can be searched for. Case is important in this instance. To search again for the same data use Psion-G. Display ------- There are two forms of display - one with file information shown and one without. The font size is altered accordingly and a larger font is used if the file information is not shown. To switch between the two formats use Psion-I. If the information is not displayed then individual file information can be shown by placing the cursor on the file and pressing Psion-N. The directories and files can either be shown sorted or unsorted. This toggle is operated by using Psion-S. Both of the above options can be made to be permanent so that the program always starts up in the same manner by using Shift-Psion-C. This displays a dialog with the two options. The result of this dialog is saved in a JBTREE.CFG file in the JBTREE sub-directory. To refresh to display (of use after an alteration which does not rewrite the screen) use Psion-U. SSD Pack information can be displayed using Psion-F. Launch Sub-Menu --------------- There is an optional sub-menu available for Launching applications (APP/OPA/OPO). This option appears on the Sundry Menu and will only be shown if the file JBTL.OPO is present in the correct directory (normally JBTREE off the directory in which JBTree resides). On selecting this option (using Shift-Psion-L) a menu is displayed with up to 40 programs on it. They will be displayed in the order they appear in the JBTL.DBF database. The final two options on the menu cards are to return to JBTree or to configure the programs. The configure options are to Add or Edit. Edit will just run the machine's Data program with JBTL.DBF as the file to launch with. Add presents a dialog which allows selection of the Application (the default drive is actually ROM:: although the Drive is shown as Internal); the datafile (if required); and a key which will appear as the short-cut key on the menu. To provide a Psion+key short-cut use a lower case character - Upper case will give the Shift+Psion+key option. If a short-cut key is chosen that is already in use you will be thrown back to the dialog, otherwise, on pressing Enter, the new data is saved to the database and the Menu will be shown again. N.B. At present JBTL.OPO will run as a stand-alone option as long as its database is in the same directory. I am examining other ways of implementation so there is no guarantee that this stand-alone option will exist in future versions. Speed ----- The program is not the fastest in the world (primarily because it is written in OPL rather than 'C'). The fastest setup would be with Sort and File information Off. To achieve this - once in the directory tree press Psion-I and then Psion-S (or use the configuration option so that the program remembers the setup [^C]). The configuration file (JBTREE.CFG) created when using ^C will exist in the same directory as the JBTREE.DBF file. The directory and file are created if they don't already exist. The .CFG file is not required for the running of the program and, if you never press Psion-Shift-C, it will not be created. Exiting the program ------------------- You can exit instantly with Psion-Esc or Psion-X wherever you are in the program. Disclaimers ----------- I presume there are still some bugs as it is a very complex program with many Procedures. I think I've cleared up most of the nasty ones though. If you have any questions regarding the operation of the program I will try to help you and I'm always open to suggestions for improvements (I reserve the right not to implement them though). Please report any bugs found as soon as possible so that I might try to clear them up. As is usual with programs of this sort, I will not be held responsible for any loss of data (or damage to the hardware?) however caused as a result of using this program. I reserve all rights of copyright to the program although payment is not required to use it. Enjoy! Alterations =========== 20 October 1993 --------------- I have increased the arrays holding the names of the directories and files so that there is now a maximum of 256 each (it was 100 each). I have finally tracked down the spurious 'dash' which appeared and then disappeared when the screen was being updated. The problem with deleting the last file in the root directory causing the program to fall over has now been fixed. 'I' will now present a larger font as well as get rid of the files information. 'F' now gives more information about the Pack (thanks to Wolfgang). Pa 4 22 October 1993 --------------- Now comes with a configuration file to remember the state of the Sort and File Information options. Configuration files now in a sub-directory (JBTree) off the source directory of the main program. Help page re-written to make more sense. 23 October 1993 --------------- Added 'F' to Help page - sorry I forgot to include this one for Pack Information. Added update to previous installation (move JBTREE.DBF to new directory). 'F' - Pack information now reads external drives (this was to stop it crashing if you tried it!). Increased the remote drives to REM::Y: (Unable to do Z: as the string would be too long - if this is a problem I could re-write to cure but I wonder how many people have drive Z's). Added Shift-I to show individual file information (primarily for use when the File Info is switched off). 24 October 1993 --------------- Added directory copy/move/delete using 'C'/'M''^D. Fixed problem of last marked file not always being accepted although shown as marked. Fixed problem of Directory tree not correct on Move/Copy. Fixed problem of sub-directories occasionally appearing on the wrong directory. 31 October 1993 --------------- Fixed problem of not showing Read-only flag on files. Fixed problem of not re-writing screen after file attribute change. 'I' toggle now stays in same directory after toggle. 2 November 1993 (3.0.6a) --------------- Added File find using 'L' and ^L. Added screen prompt when copying and moving files. Fixed program falling over when trying to delete a directory with files still in. Fixed tree rewrite after moving a file from the root. Fixed problem of all files showing as Read-only! 7 November 1993 (3.0.7) --------------- Added message for when a search finds nothing. Finally fixed problem with Sort in the root directory. 22 November 1993 (3.0.8) ---------------- Added prompt to choose destination when copying/moving directories. Fixed File Delete dialog working incorrectly. Added option to use Word to view any file. Cured problem of showing sub-directories after copying/moving files. Added Hex view/edit mode for files. 28 December 1993 (3.0.8a) ---------------- Added option to escape from Hex Editor with Psion-X. Intercepted error when searching for an ASCII string when in HEX part of Hex Editor. Stopped screen updates when ineffective key pressed. Fixed occasional bogus line at the top of the directory listing after displaying a sub-directory tree. Cleaned up file size display justification. 11 January 1994 (3.0.8b) -------------- Fixed problem of file size display formatting after using Hex Editor. Fixed problem of ASCII search in Hex Editor not finding small strings. Fixed display of sub-directories after using Hex Editor. Inhibited error when pressing right cursor twice very fast. 14 January 1994 (3.1) --------------- Changing file attributes now doesn't move the cursor to the top of the list. Fixed problem in Hex Editor of not allowing lower case characters in the ASCII section when editing. Rationalised Version numbers (Goodness knows why it got into such a state - I ask you - a3.0.8b???). 3.1 is NOT a major upgrade! Added Copy/Move & Rename a file (Use Ctrl-R for Copy / Ctrl-M for Move). - Thanks for the suggestion Wolfgang! 7th February 1994 (3.1.1) ----------------- Added Shift-X to get out of program. Stopped screen update when switching from the files list to the directory list. Added Ctrl-U to update lists. Speeded up reading directories slightly. 28th March 1994 (4.0) --------------- Altered user keys to conform to normal Psion standards and added Menus. Added 'Searching' message to the Hex Edit search function. Fixed problem with lower case letters in ASCII Hex Edit. Added Psion-F to Files list so that Pack information can be seen whilst in the files as well as when in the directory tree. Fixed problem with falling over when trying to Move or Copy without any files marked. Fixed searching problem of redefining search string after first file find. Fixed cursor position after Jumping to an address in the Hex Edit. Altered file attributes edits to use marked files (to allow block changes). Added Psion-X : exit keys. Added Psion-J : About key. Added Psion-R : Rename directory. 31 March 1994 (4.0a) ------------- Fixed problem with displaying attributes of files requiring too many keypresses. Added option to just display attributes for file under cursor. Added option to abandon viewing of attributes. 14 April 1994 (4.1) ------------ Fixed problem with displaying info about un-named SSD's. Fixed problem with displaying info when pack is write-protected. Fixed problem with trying to rename a file with no extension. Escape in Hex Editor froze the cursor - now fixed. Escape removed as a method of exiting the program unless in the drive selection dialog. Locate a file was flawed. Now fixed. Problem with selecting newly formatted SSD solved. Problem with copying sub-directories dialog choices being reversed cured. Added Launch sub-menu. Contact ------- John Boyce CompuServe: 100014,1240 CIX: jboyce@cix.compulink.co.uk